package com.xoa.controller.financialManage.charge;


import com.xoa.model.financialManage.charge.ChargeSetting;
import com.xoa.service.financialManage.charge.ChargeSettingService;
import com.xoa.util.ToJson;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 预警设置
 * </p>
 *
 * @author liujian
 * @since 2020-04-23
 */
@RestController
@RequestMapping("/chargeSetting")
public class ChargeSettingController {

    @Autowired
    private ChargeSettingService chargeSettingService;

    //查询全部
    @RequestMapping("/findSetingAll")
    public ToJson findSetingAll(ChargeSetting chargeSetting,Integer page,Integer limit){
        return chargeSettingService.findSetingAll(chargeSetting,page,limit);
    }

    //根据Id查询
    @RequestMapping("/findSetingById")
    public ToJson findSetingById(ChargeSetting chargeSetting){
        return chargeSettingService.findSetingById(chargeSetting);
    }

    //新增和编辑
    @RequestMapping("/enidOrInsertSeting")
    public ToJson enidOrInsertSeting(ChargeSetting chargeSetting){
        return chargeSettingService.enidOrInsertSeting(chargeSetting);
    }

    //删除
    @RequestMapping("/delSeting")
    public ToJson delSeting(ChargeSetting chargeSetting){
        return chargeSettingService.delSeting(chargeSetting);
    }

}
